<?php

App::uses('AppController', 'Controller');

class ShareReceiverController extends AppController {
    public $autoRender = false;

    public $components = array(
        'Auth' => array(
            'loginAction' => '/share_receiver/login',
            'allow' => array(
                array ('action' => 'login' )
            ),
            'authenticate' => array('Basic')
        )
    );

    public function login() {
        if ($this->Auth->login()) {
            return $this->redirect('index');
        } else {
            echo 'Not able to login';
        }
    }

    public function index() {
        header("Content-Type:text/plain; charset=utf-8");
        print_r($_FILES); echo "\n\n";
        print_r($_POST); echo "\n\n";

        die('Welcome');
    }
}